home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Format Collection 13
/
PCFORMAT.bin
/
demo.dir
/
00035_Script_Myscore script
< prev
next >
Wrap
Text File
|
1995-03-06
|
8KB
|
285 lines
--Smalltown heroes
--Programming ⌐ 1994 The Last Museum Catalogue Co
global gMachineType -- legal values are "Mac" or "PC"
global gDebug -- Boolean : If true debug information is sent to message window
global gRAMavailable -- Integer : RAM available at startup
global gmovieSprite -- The sprite channel that movies get played in
global gLyricSprite -- The sprite channel lyrics are displayed in
global gTrack -- the currently playing CDDA audio track
global stopEnable -- if true, then the last lyric displayed stops the CD audio
on Init
-- This is the first handler called by the movie
-- This handler determines :
-- that the machine has enough RAM
-- If the machine is a Mac or PC
-- the path name to the current directory
-- if Quicktime is present
-- the colordepth of the monitor the stage is on
global gMachineType, gRAMavailable, gOriginalColorDepth, gMyPathName, gDebug
global Macintosh, gmovieSprite, gAVPathName, gLyricSprite, gTrack
global lastTC
global movie1duration, movie2duration
if Macintosh then
set gOriginalColorDepth = the colorDepth -- store this for reseting the monitor at quit time
if gDebug then put "original colordepth =" && the colorDepth
set the colorDepth = 32 -- for now, assume the mac has millions of colurs
if gDebug then put "the colordepth =" && the colorDepth
end if
cursor 4
-- show progress bar
set the visible of sprite 36 to TRUE
set the visible of sprite 37 to TRUE
puppetsprite 37 TRUE
set the castnum of sprite 37 to 73
updatestage
--put "RAM needed" && ramneeded (1,55) / 1024
if the machineType = 256 then
set gMachineType = "PC"
set Macintosh = FALSE
else
set gMachineType = "Mac"
set Macintosh = TRUE
end if
set gLyricSprite = 33
set the visible of sprite gLyricSprite to FALSE
updatestage
puppetSprite gLyricSprite, TRUE
set the castnum of sprite gLyricSprite to 148 -- set lyric text to a null string
--update loading bar
set the castnum of sprite 37 to 74
updatestage
if Macintosh then
put the pathname into Mypath
put Mypath & "qt" into MyQTpath
put Mypath & "images8" into MyAVpath
set the searchpath to ["heroes:images8","heroes:qt", Mypath, MyQTpath, MyAVpath]
--put the searchpath
else
if gDebug then put "setting searchpath"
set the searchpath to ["d:\images8\", "d:\qt\",¼
"g:\images8\", "g:\qt\",¼
"e:\images8\", "e:\qt\",¼
"f:\images8\", "f:\qt\",¼
"h:\images8\", "h:\qt\",¼
"i:\images8\", "i:\qt\",¼
"j:\images8\", "j:\qt\",¼
"k:\images8\", "k:\qt\",¼
"l:\images8\", "l:\qt\",¼
"m:\images8\", "m:\qt\",¼
"n:\images8\", "n:\qt\",¼
"o:\images8\", "o:\qt\",¼
"p:\images8\", "p:\qt\",¼
"r:\images8\", "r:\qt\",¼
"s:\images8\", "s:\qt\",¼
"t:\images8\", "t:\qt\",¼
"v:\images8\", "v:\qt\",¼
"q:\heroes\images8\", "q:\heroes\"]
if gDebug then put "completed"
end if
--update loading bar
set the castnum of sprite 37 to 75
updatestage
if integer(the memorySize /1024) < 1000 then
alert "Warning : less than 1000 K of RAM is availble"
end if
if integer(the freeBlock) / 1024 < 750 then
alert "Warning : less than 750 K of contiguous free RAM available :only " && ¼
integer(the freeBlock) / 1024 && "available"
end if
if the quickTimePresent then
continue
else
alert "Quicktime not found"
quit
end if
if gDebug then put "setting pathnames"
put the pathName into gMyPathName
if gDebug then put "got the pathname" && gMypathName
--set the path for the 'av' director movie
if macintosh then
put gMyPathname & "images8:" into gAVpathName
set the fileName of cast 64 to "Heroes:qt:Studio4.mov"
else
put gMyPathname & "images8\" into gAVpathName
set the castnum of sprite 37 to 76
updatestage
if gDebug then put "setting name for 64"
set the fileName of cast 64 to "Studio4.mov"
set the castnum of sprite 37 to 77
updatestage
end if
if gDebug then put "complete"
set the castnum of sprite 37 to 78
updatestage
if gDebug = TRUE then
put "Machine type = " && the machinetype
put "Colordepth = " && the colordepth
put "Freeblock = " && the freeBlock / 1024
put "Freebytes = " && the freebytes / 1024
put "MemorySize = " && the memorysize / 1024
put "Pathname = " && gMyPathName
put "AV Pathname = " && gAVPathName
end if
set gmovieSprite = 10
set the visible of sprite gMoviesprite to FALSE
updatestage
if gDebug then put "complete"
--set the default CDDA audio to track to 0
set gTrack = 0
put the duration of cast 64 into movie1duration
--set up QTmovies initial states
--set the preloadRAM to 1000 * 1024
set the preload of cast 64 to FALSE
set the pausedAtStart of cast 64 to FALSE
set the directToStage of cast 64 to TRUE
set the controller of cast 64 to FALSE
set the sound of cast 64 to 1
set the castnum of sprite 37 to 79
updatestage
cursor -1
end
on startMovie
global gMovieSprite, Macintosh, gTrack, gDebug, lastTC
if gDebug then put "executing start movie"
set the visible of sprite gMovieSprite to FALSE
updatestage
put 0 into field "framesInToTrack"
set gTrack = 0
if the shiftDown then
set gDebug = TRUE
else
set gDebug = FALSE
end if
end
on stopMovie
global gMovieSprite, Macintosh, gTrack, gDebug, lastTC
if macintosh then
nothing
else
if gDebug then
set the traceLogFile to ""
end if
mci "close CDaudio"
if gDebug then put the result
end if
end
on playmovie1
-- studio movie
global gMovieSprite, Macintosh, gMoviePlaying, movie1duration
global movieduration
if the movierate of sprite gMovieSprite = 1 and the castnum of sprite gMovieSprite = 64 and ¼
the visible of sprite gMovieSprite = TRUE then
if gdebug then put "movie already playing"
endmovie
else
puppetSprite gmovieSprite, TRUE
set gMoviePlaying = 1
cursor 4
put movie1duration into movieduration
if gdebug then put "movieduration" && movieduration
if gdebug then put "preload of cast 64 = " && the preload of cast 64
--preloadCast 64
if gdebug then put "preload of cast 64 = " && the preload of cast 64
set the castnum of sprite gMovieSprite to 64
set the volume of sprite gMovieSprite to 255
set the visible of sprite gMovieSprite to TRUE
set the controller of cast 64 to TRUE
updatestage
set the movierate of sprite gMovieSprite to 1
updatestage
cursor -1
end if
end
on endmovie
global gMovieSprite, Macintosh
cursor 4
set the movierate of sprite gMovieSprite to 0
set the visible of sprite gMovieSprite to FALSE
cursor -1
end
on FlashRoller whichChannel, scriptToExecute
set myCast = the mouseCast
set flag = 0
if the mouseDown then
set the castNum of sprite whichChannel = myCast + 1
updateStage
repeat while the mouseDown
if not rollover(whichChannel) then exit repeat
end repeat
if rollover(whichChannel) then set flag = 1
end if
if flag then do scriptToExecute
end